﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_KhoaSo : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("CmdChon")]
        private Button _CmdChon;
        [AccessedThroughProperty("CmdThoat")]
        private Button _CmdThoat;
        [AccessedThroughProperty("GroupBox1")]
        private GroupBox _GroupBox1;
        [AccessedThroughProperty("Label13")]
        private Label _Label13;
        [AccessedThroughProperty("TxtNgayChungTu")]
        private DateTimePicker _TxtNgayChungTu;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private cls_LockUnlockData objLock;

        public Frm_KhoaSo()
        {
            base.Load += new EventHandler(this.Frm_KhoaMoSo_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.objLock = new cls_LockUnlockData();
            this.mAllowView = false;
            this.mAllowDel = false;
            this.mAllowEdit = false;
            this.mAllowAdd = false;
            this.InitializeComponent();
        }

        private void CmdChon_Click(object sender, EventArgs e)
        {
            this.objLock.KhoaNhanVienCapNhat = modGeneral.H_USERID;
            this.objLock.Ngay = LVYModule.Date2Char(this.TxtNgayChungTu.Text);
            this.objLock.NgayCapNhat = LVYModule.Date2Char(Strings.Format(DateAndTime.Today, "dd/MM/yyyy"));
            this.objLock.KiemTra();
            this.objLock.Save();
            modGeneral.H_LOCKDATE = this.objLock.Ngay;
            this.Dispose();
        }

        private void CmdThoat_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_KhoaMoSo_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                this.objLock.Load();
                if (LVYModule.ReturnIfNull(this.objLock.Ngay, "", modGeneral.TypeOfValue.Nothing).ToString().Trim() != "")
                {
                    this.TxtNgayChungTu.Text = LVYModule.Char2Date(this.objLock.Ngay);
                }
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_KhoaSo));
            this.Label13 = new Label();
            this.TxtNgayChungTu = new DateTimePicker();
            this.GroupBox1 = new GroupBox();
            this.CmdThoat = new Button();
            this.CmdChon = new Button();
            this.GroupBox1.SuspendLayout();
            this.SuspendLayout();
            this.Label13.AutoSize = true;
            Point point = new Point(0x1d, 0x31);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            Size size = new Size(0x4e, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x1f;
            this.Label13.Text = "T\x00ednh đến ng\x00e0y";
            this.TxtNgayChungTu.Format = DateTimePickerFormat.Custom;
            point = new Point(0x8b, 0x2d);
            this.TxtNgayChungTu.Location = point;
            this.TxtNgayChungTu.Name = "TxtNgayChungTu";
            size = new Size(0x57, 20);
            this.TxtNgayChungTu.Size = size;
            this.TxtNgayChungTu.TabIndex = 30;
            this.GroupBox1.BackColor = Color.Transparent;
            this.GroupBox1.Controls.Add(this.Label13);
            this.GroupBox1.Controls.Add(this.TxtNgayChungTu);
            point = new Point(4, 3);
            this.GroupBox1.Location = point;
            this.GroupBox1.Name = "GroupBox1";
            size = new Size(0x110, 0x6c);
            this.GroupBox1.Size = size;
            this.GroupBox1.TabIndex = 0x20;
            this.GroupBox1.TabStop = false;
            this.GroupBox1.Text = "T\x00f9y chọn";
            this.CmdThoat.DialogResult = DialogResult.Cancel;
            this.CmdThoat.Image = (Image) manager.GetObject("CmdThoat.Image");
            this.CmdThoat.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0xc5, 0x75);
            this.CmdThoat.Location = point;
            this.CmdThoat.Name = "CmdThoat";
            size = new Size(0x4f, 0x18);
            this.CmdThoat.Size = size;
            this.CmdThoat.TabIndex = 60;
            this.CmdThoat.Text = "&Tho\x00e1t";
            this.CmdThoat.UseVisualStyleBackColor = true;
            this.CmdChon.Image = (Image) manager.GetObject("CmdChon.Image");
            this.CmdChon.ImageAlign = ContentAlignment.MiddleLeft;
            point = new Point(0x72, 0x75);
            this.CmdChon.Location = point;
            this.CmdChon.Name = "CmdChon";
            size = new Size(0x4e, 0x18);
            this.CmdChon.Size = size;
            this.CmdChon.TabIndex = 0x3b;
            this.CmdChon.Text = "&Chọn";
            this.CmdChon.UseVisualStyleBackColor = true;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            this.BackgroundImage = ACCOUNTING.My.Resources.Resources.background;
            size = new Size(0x119, 0x91);
            this.ClientSize = size;
            this.ControlBox = false;
            this.Controls.Add(this.CmdThoat);
            this.Controls.Add(this.CmdChon);
            this.Controls.Add(this.GroupBox1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.Name = "Frm_KhoaSo";
            this.ShowIcon = false;
            this.ShowInTaskbar = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "HT-005";
            this.Text = "KHOA SO";
            this.GroupBox1.ResumeLayout(false);
            this.GroupBox1.PerformLayout();
            this.ResumeLayout(false);
        }

        internal virtual Button CmdChon
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdChon;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdChon_Click);
                if (this._CmdChon != null)
                {
                    this._CmdChon.Click -= handler;
                }
                this._CmdChon = value;
                if (this._CmdChon != null)
                {
                    this._CmdChon.Click += handler;
                }
            }
        }

        internal virtual Button CmdThoat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdThoat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdThoat_Click);
                if (this._CmdThoat != null)
                {
                    this._CmdThoat.Click -= handler;
                }
                this._CmdThoat = value;
                if (this._CmdThoat != null)
                {
                    this._CmdThoat.Click += handler;
                }
            }
        }

        internal virtual GroupBox GroupBox1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._GroupBox1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._GroupBox1 = value;
            }
        }

        internal virtual Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual DateTimePicker TxtNgayChungTu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtNgayChungTu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TxtNgayChungTu = value;
            }
        }
    }
}

